<% /* $Id: source.jsp 132 2011-08-26 10:23:42Z altdotua@gmail.com $ */ %>

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>

<%@ include file="header.jsp" %>

<%
	SubmissionFull submissionFull = SubmissionsModel.getSubmissionFull(Long.parseLong(request.getParameter("submission_id")));
%>

<h2 align="center"><%= "Розвязок #" + submissionFull.getSubmissionEntry().getId() %></h2>
<%
	if (null == submissionFull)
	{
%>
		<h2 align="center">Розвязок не знайдено</h2>
<%
	}
	else
	{
		if (!(contestUser.isJudge() || submissionFull.getSubmissionEntry().getUserId().equals(user.getId())))
		{
%>
			<h2 align="center">Доступ заборонено</h2>
<%
		}
		else
		{
%>
<h2><a href="<%= Linker.link("contests/submission.jsp?contest_id=" + contest.getId() + "&submission_id=" + submissionFull.getSubmissionEntry().getId()) %>">Результат перевірки</a></h2>
<pre>
<%= submissionFull.getSubmissionDetailsEntry().getSourceCode().toString() %>
</pre>
<%
		}
	}
%>

</body>